package cn.lhl.core.demo.emoji.filter.cfg.emoji;

import java.util.Arrays;
import java.util.List;
import lombok.Data;
import org.springframework.boot.context.properties.ConfigurationProperties;

/**
 * 处理提交数据中的表情符号 配置外部化
 *
 * @author liuhongliang
 * @version 2021/9/1
 */
@ConfigurationProperties("prj-emoji")
@Data
public class EmojiProp {

  /**
   * 启用开关
   */
  private boolean enabled = false;

  /**
   * 优先级顺序
   */
  private int order = 2;

  /**
   * 过滤
   */
  private List<String> filteredUriList = Arrays.asList("/*");

  /**
   * 白名单
   */
  private List<String> excludedUriList = Arrays.asList("/xxx/yyy");

  /**
   * 过滤 - contentType
   */
  private List<String> filteredMediaTypeList = Arrays.asList("application/x-www-form-urlencoded",
      "application/json",
      "application/xml");

  /**
   * I/O处理过程中使用的字符集编码
   */
  private String charset = "utf-8";
}
